/**
 * 组件名：Loading
 * 作用：加载中组件的显示与控制
 * props：
 *      - tip：用于加载文案的显示，string类型
 *      - spinning：控制组件是否显示，默认true
 */

import React, { Component } from "react"
import { Spin } from "antd"
class Loading extends Component {
    // 默认值
    static defaultProps = {
        tip: "疯狂加载中...",
        spinning: true,
    }
    render() {
        return (
            <div style={{ display: "flex", justifyContent: "center", alignItems: "center", height: "100%" }}>
                <Spin size="large" tip={this.props.tip} spinning={this.props.spinning} />
            </div>
        )
    }
}

export default Loading
